<?php
namespace app\wap\controller;

class Tags extends Base{

    public function index(){
        $tagname = request()->get("tagname");
        $tagname = urldecode($tagname);
        $doclist = _db('article_doc' , [] , false)
            ->field('ad.*')
            ->alias('ad')
            ->join('mf_article_doc_tag adt' , 'adt.article_doc_id=ad.id' , 'LEFT')
            ->join('mf_tag t' , 't.id=adt.tag_id' , 'LEFT')
            ->where('t.tag_name' , $tagname)
            ->order('ad.create_time desc')
            ->paginate(50);
        return $this->fetchHtml('index' , [
            'web_title'=> "{$tagname}比赛录像|{$tagname}录像回放 - 看球吧",
            'web_kw'   => "{$tagname}比赛录像,{$tagname}录像回放",
            'web_desc' => "看{$tagname},{$tagname}比赛录像,{$tagname}比赛视频回放尽在看球吧",
            'doclist' => $doclist,
            'tagname' => $tagname
        ]);
    }


}